<ul class="posts">

    {% for post in posts %}
    <li class="post-list">
        <div class="post-div">
            <div class="post-list-title">
                <a href="{{ url_for('.post', id=post.id) }}"><span class="mid-span">文章标题测试</span></a></div>
            <div class="post-list-msg">
                <div class="float-left">
                    <a href="{{ url_for('.user', username=post.author.username) }}">

                    </a>
                    <a href="{{ url_for('.user', username=post.author.username) }}"><span class="black-sm-span">{{ post.author.username }}</span></a>
                </div>
                <div class="float-left"><span class="gray-sm-span">发布于{{ moment(post.timestamp).fromNow() }}</span></div>
                <div class="float-left"><span class="gray-sm-span">35个阅读</span></div>
                <div class="clear-both"></div>
            </div>
            <div class="post-list-content post-content">
                <span class="black-sm-span">
                    {% if post.body_html %}
                        {{ post.body_html | safe }}
                    {% else %}
                        {{ post.body }}
                    {% endif %}
                </span>
            </div>
            <div class="post-list-operate">
                <div class="float-left">
                    <a class="post-good" href="">86</a>
                    <a class="post-bad" href="">105</a>
                </div>
                <div class="float-right">
                    <a class="post-collect" href="">3收藏</a>
                    <a class="post-comment" href="{{ url_for('.post', id=post.id) }}#comments">{{ post.comments.count() }}评论</a>
                </div>
                <div class="clear-both"></div>
            </div>
        </div>
    </li>
    <!--<li class="post">-->
        <!--<div class="profile-thumbnail">-->
            <!--<a href="{{ url_for('.user', username=post.author.username) }}">-->
                <!--<img class="img-rounded profile-thumbnail" src=" post.author.gravatar(size=40) " />-->
            <!--</a>-->
        <!--</div>-->
        <!--<div class="post-date">{{ moment(post.timestamp).fromNow() }}</div>-->
        <!--<div class="post-author">-->
            <!--<a href="{{ url_for('.user', username=post.author.username) }}">-->
                <!--{{ post.author.username }}-->
            <!--</a>-->
        <!--</div>-->
        <!--<div class="post-body" >-->
            <!--{% if post.body_html %}-->
                <!--{{ post.body_html | safe }}-->
            <!--{% else %}-->
                <!--{{ post.body }}-->
            <!--{% endif %}-->
            <!--<div class="post-footer">-->
                <!--<a href="{{ url_for('.post', id=post.id) }}">-->
                    <!--<span class="label label-default">文章显示页</span>-->
                <!--</a>-->
                <!--{% if current_user == post.author %}-->
                <!--<a href="{{ url_for('.edit', id=post.id) }}">-->
                    <!--<span class="label label-primary">编辑</span>-->
                <!--</a>-->
                <!--{% elif current_user.is_administrator %}-->
                <!--<a href="{{ url_for('.edit', id=post.id) }}">-->
                    <!--<span class="label label-danger">编辑[管理权限]</span>-->
                <!--</a>-->
                <!--{% endif %}-->
                <!--<a href="{{ url_for('.post', id=post.id) }}#comments">-->
                    <!--<span class="label label-primary">-->
                        <!--{% if post.comments.count() != 0 %}-->
                        <!--{{ post.comments.count() }}条评论-->
                        <!--{% else %}-->
                        <!--暂无评论-->
                        <!--{% endif %}-->
                    <!--</span>-->
                <!--</a>-->
            <!--</div>-->
        <!--</div>-->
    <!--</li>-->
    {% endfor %}
</ul>